﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using DataAnnotationsExtensions;
namespace DeviceFinder.Models
{
    public class DeviceModel
    {
        public int ID { get; set; }

        [Required]
        [DataType(DataType.Text)]
        [Display(Name = "Name of device")]
        public string Name { get; set; }

        [Required]
        [DataType(DataType.Text)]
        [Display(Name = "Type of device")]
        public string Type { get; set; }

        [Required]
        [Display(Name = "Follow ?")]
        public bool IsFollow { get; set; }

        [Required]
        [DataType(DataType.Text)]
        [Display(Name = "Home page")]
        public string HomePage { get; set; }

        [Required]
        [Integer(ErrorMessage = "This value is integer number")]
        [Display(Name = "Web cam capture")]
        public int WebcamCapture { get; set; }

        [Display(Name = "Description")]
        public string Description { get; set; }

        [Required]
        [Display(Name = "Active command ?")]
        public bool IsActiveCommand { get; set; }

        [Required]
        [DataType(DataType.Text)]
        [Display(Name = "User email")]
        public string EmailUser { get; set; }
    }

    public class CommandModel
    {
        [Required]
        [Display(Name = "Command Type: ")]
        [DataType(DataType.Text)]
        public string Opcode { get; set; }

        [Required]
        [Display(Name = "Paramerter: ")]
        [DataType(DataType.Text)]
        public string Param { get; set; }

        [Required]
        public int IDDevice { get; set; }
    }

    public class DeviceShowModel
    {
        public string ID { get; set; }

        public string Name { get; set; }

        public string Type { get; set; }

        public string IsFollow { get; set; }

        public string HomePage { get; set; }

        public int WebcamCapture { get; set; }

        public string IsActiveCommand { get; set; }
    }
}